home *** CD-ROM | disk | FTP | other *** search
/ Word Play Farm / Word Play Farm.iso / pc / movies / shared.dxr / 00516_RollOver Scripts.ls < prev    next >
Encoding:
Text File  |  1996-07-29  |  1.7 KB  |  72 lines

  1. on CheckRoll psButtonList
  2.   set numlist to the number of items in psButtonList
  3.   repeat with i = 1 to numlist
  4.     set spritenum to value(item i of psButtonList)
  5.     if rollOver(spritenum) then
  6.       return spritenum
  7.       exit
  8.     end if
  9.   end repeat
  10.   return -1
  11. end
  12.  
  13. on SwapRoll piSpriteNum, psSwapCast
  14.   global gLast_Roll_Sprite
  15.   if piSpriteNum > 0 then
  16.     if gLast_Roll_Sprite <> piSpriteNum then
  17.       RollReset()
  18.       puppetSprite(piSpriteNum, 1)
  19.       if integerp(psSwapSprite) then
  20.         set NewCast to the number of cast psSwapCast
  21.       end if
  22.       set the castNum of sprite piSpriteNum to NewCast
  23.       updateStage()
  24.       set gLast_Roll_Sprite to piSpriteNum
  25.     end if
  26.   else
  27.     RollReset()
  28.   end if
  29. end
  30.  
  31. on HiliteGraphic piSpriteNum, piHiLiClr, piHiLiSize
  32.   global gLast_Roll_Sprite
  33.   if piSpriteNum > 0 then
  34.     if gLast_Roll_Sprite <> piSpriteNum then
  35.       RollReset()
  36.       if not (the puppet of sprite piSpriteNum) then
  37.         puppetSprite(piSpriteNum, 1)
  38.       end if
  39.       if not voidp(piHiLiClr) then
  40.         set the foreColor of sprite piSpriteNum to piHiLiClr
  41.       end if
  42.       if not voidp(piHiLiSize) then
  43.         set the lineSize of sprite piSpriteNum to piHiLiSize
  44.       end if
  45.       updateStage()
  46.       set gLast_Roll_Sprite to piSpriteNum
  47.     end if
  48.   else
  49.     RollReset()
  50.   end if
  51. end
  52.  
  53. on RollReset
  54.   global gLast_Roll_Sprite
  55.   if gLast_Roll_Sprite > 0 then
  56.     puppetSprite(gLast_Roll_Sprite, 0)
  57.     set gLast_Roll_Sprite to EMPTY
  58.     updateStage()
  59.   end if
  60. end
  61.  
  62. on FlashGraphic piSpriteNum, piHiLiClr, piHiLiSize
  63.   global gFlashTime
  64.   if voidp(gFlashTime) then
  65.     set gFlashTime to 0.25
  66.   end if
  67.   RollReset()
  68.   HiliteGraphic(piSpriteNum, piHiLiClr, piHiLiSize)
  69.   WaitaSec(gFlashTime)
  70.   RollReset()
  71. end
  72.